﻿module CodeCamp01.Sponsors
{
  import CodeCamp01.BasicTypes;
  import CodeCamp01.Events;

  // Base types
  
  type SupporterWithUrl
  {
    Id : Integer32 => AutoNumber();
    EventId : Event where value in Events;
    Name : Text128;
    Url : Text1024;
  }
  
  // Concrete types
  
  type IndividualContributor
  {
    Id : Integer32 => AutoNumber();
    EventId : Event where value in Events;
    FirstName : Text128;
    LastName : Text128;
  }

    
  type CommunitySponsor : SupporterWithUrl;
    
  type Sponsor : SupporterWithUrl
  {
        ImageUrl : Text1024;
        ImageHeight : Integer32;
        ImageWidth : Integer32;
  }
    
  // Extents
  
  IndividualContributors : { IndividualContributor* } where
    identity Id,
    unique( FirstName, LastName, EventId );
  
  CommunitySponsors : { CommunitySponsor* } where
    identity Id,
    unique( Name, EventId );

  Sponsors : { Sponsor* } where
    identity Id,
    unique( Name, EventId );
    
  // Values
    
    IndividualContributors
    {
        { EventId => Events.PCC2010, FirstName => "Dennis", LastName => "Dietrich" },
        { EventId => Events.PCC2010, FirstName => "Mark", LastName => "Lawler" },
        { EventId => Events.PCC2010, FirstName => "Arnie", LastName => "Rowland" }
    }
    
    CommunitySponsors
    {
        { EventId => Events.PCC2010, Name => "Flash PDX User Group", Url => "http://flashpdx.org/" },
        { EventId => Events.PCC2010, Name => "Northwest Oracle Users Group (NWOUG)", Url => "http://nwoug.org/" },
        { EventId => Events.PCC2010, Name => "Oregon SQL -developers (OSQL-d)", Url => "http://osql-d.sqlpass.org/" },
        { EventId => Events.PCC2010, Name => "Pacific Northwest Software Quality Conference (PNSQC)", Url => "http://www.pnsqc.org/" },
        { EventId => Events.PCC2010, Name => "PDX PHP User Group (PDXPHP)", Url => "http://pdxphp.org/" },
        { EventId => Events.PCC2010, Name => "PDXScala Users Group", Url => "http://pdxscala.org/" },
        { EventId => Events.PCC2010, Name => "Portland Area .NET Users Group (PADNUG)", Url => "http://padnug.org/" },
        { EventId => Events.PCC2010, Name => "Portland Java Users Group (PJUG)", Url => "http://www.pjug.org/" },
        { EventId => Events.PCC2010, Name => "Portland Rich Internet Developers Group (PDX RIA)", Url => "http://groups.adobe.com/group/315" },
        { EventId => Events.PCC2010, Name => "Portland Silverlight User Group (PSUG)", Url => "http://www.portlandsilverlight.net/" },
        { EventId => Events.PCC2010, Name => "Portland SQL Server Users Group (PDXSSUG)", Url => "http://pdxssug.com/" },
        { EventId => Events.PCC2010, Name => "Portland User Interface SIG (PUISIG)", Url => "http://www.portlandusability.com/" },
        { EventId => Events.PCC2010, Name => "Search Engine Marketers of Portland (SEMpdx)", Url => "http://www.sempdx.org/" },
        { EventId => Events.PCC2010, Name => "Software Association of Oregon (SAO)", Url => "http://www.sao.org/" }
    }
}